<template>
  <div>
    我是父组件
    <!-- <children :visible="visible" :ref="(el) => FormSet(el, 'd')">
      <template v-slot:test ></template>
    </children> -->
    <children :visible="visible" ref="FileUploadFormRef">
      <template v-slot:test></template>
    </children>

    <div
      v-for="(value, index) in TableDropDownOperationFn({ id: 1 }, nowClick)"
      :key="index"
      @click="value.onClick"
    >
      {{ index }}
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref, watch, onMounted, defineProps, reactive, defineExpose } from "vue";
import children from "./children.vue";
let visible = true;
let FileUploadFormRef = ref<any>({});
const FormSet = (el, type: string) => {
  FileUploadFormRef.value[type] = el;
};
import { getCurrentInstance } from "vue";
console.log("我是this:", getCurrentInstance().refs);
onMounted(() => {
  console.log("this:", getCurrentInstance().refs);
});

import { TableDropDownOperationFn } from "./config";
let nowClick = (a: any) => {
  console.log(a);
};
</script>

<style scoped></style>
